package usersObjects;
import serializableObjects.*;

/**
 * Created by root on 12/8/13.
 */
public class UserSave implements UserBehavior{
    private final String descriptionBehavior = "To exit from the testing";

    @Override
    public String getDescriptionBehavior() {
        return descriptionBehavior;
    }

    @Override
    public boolean executeBehavior(StorageOfUsers currentStorageOfUser, UserCertificate currentUserCertificate) {
        SerializableUser serializableUser = currentStorageOfUser.getSerializableUser(currentUserCertificate);
        SerializableMethods.saveUsers(serializableUser);
        return true;
    }
}
